<?php
// 服务控制器
class Controller_WWW_Service extends Controller_WWW_Template
{
    public function __construct ($req, $res)
    {
        $this->template = "smarty:www/service/contact";
        parent::__construct($req, $res);

    }

    public function action_index ()
    {
        //
    }

    public function action_contact(){
        $this->template->set_filename("smarty:www/service/contact");
        $this->template->set('step','service');
    }

    // public function action_howto(){
    //     $article = new Article;
    //     $questions  = $article->articleByKey('questions');
    //     $website  = $article->articleByKey('website');
    //     $partners  = $article->articleByKey('partners');

    //     $this->template->set('questions',$questions);
    //     $this->template->set('website',$website);
    //     $this->template->set('partners',$partners);
    //     $this->template->set_filename("smarty:www/service/howto");
    //     $this->template->set('step','service');
    // }

    // public function action_aboutus(){
//         $article = new Article;
//         $linian  = $article->articleByKey('linian');
    //     $articles = $article->listByType("哇吖动态");
    //     $this->template->set('linian',$linian);
    //     $this->template->set('articles',$articles);
    //     $this->template->set_filename("smarty:www/service/aboutus");
    //     $this->template->set('step','service');
    // }

    public function action_aboutus_tuandui(){
        $article = new Article;
        $partners  = $article->articleByKey('tuandui');
        $this->template->set('partners',$partners);
        $this->template->set_filename("smarty:www/service/aboutus/tuandui");
    }

    public function action_aboutus_linian(){
        $article = new Article;
        $linian= $article->articleByKey('linian');
        $this->template->set('linian',$linian);
        $this->template->set_filename("smarty:www/service/aboutus/linian");
    }

    public function action_aboutus_dongtai(){
        $article = new Article;
        $articles = $article->listByType("哇吖动态");
        $this->template->set('articles',$articles);
        $this->template->set_filename("smarty:www/service/aboutus/dongtai");
    }

    public function action_howto_bzxy(){
        $this->template->set_filename("smarty:www/service/howto/bzxy");
    }

    public function action_howto_cjwt(){
        $article = new Article;
        $questions  = $article->articleByKey('questions');
        $this->template->set('questions',$questions);
        $this->template->set_filename("smarty:www/service/howto/cjwt");
    }

    public function action_howto_rhcz(){
        $article = new Article;
        $website  = $article->articleByKey('website');
        $this->template->set('website',$website);
        $this->template->set_filename("smarty:www/service/howto/rhcz");
    }

    public function action_howto_hzhb(){
        $article = new Article;
        $partners  = $article->articleByKey('partners');
        $this->template->set('partners',$partners);
        $this->template->set_filename("smarty:www/service/howto/hzhb");
    }
}
